<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org">
<head>
<title>首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	 <div  id="content">
            <section class="content-header">
                <h1>
                    <i class="fa fa-cogs"></i>
                    <strong>售后设备信息</strong>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-home "></i>Home</a></li>
                    <li>售后管理</li>
                    <li class="active">售后设备信息</li>
                </ol>
            </section>
            <!-- Main content -->
            <section class="content"> 
                 <div class="row">
                    <div class="col-md-12">
                        <div class="box box-info">
                            <div class="box-header with-border">
                                <i class="fa fa-th-list"></i>
                                <h4 class="box-title">合同信息</h4>
                            </div>
                            <div class="box-body">
                            <form id="contractAtrrForm" class="widget-box">
                            	<input type="hidden" id="contractID" name="contractID"  th:value="${contract.id}"/>
                                <table class="table table-bordered">
						            <tbody>
						             <tr class="odd gradeX">
						              <td width="8%" align="center" style="vertical-align:middle">合同号</td>
						              <td width="17%">
						              <div class="col-md-11">
						              <input class="form-control" type="text" id="supplierCode" name="supplierCode" th:value="${contract.supplierCode}" readonly="readonly"/>
			                          </div>
			                          <div class="col-md-1">
			                          <span style="color:#F00"></span>
			                          </div>
			                          </td>
			                          <td width="15%" align="center" style="vertical-align:middle">签订日期</td>
						              <td width="15%">
						              <div class="col-md-11">
						              <input class="form-control" type="date" id="signedDate" name="signedDate" readonly="readonly" th:value="${#dates.format(contract.signedDate,'yyyy-MM-dd')}"/>
			                          </div>
			                          <div class="col-md-1">
			                          <span style="color:#F00"></span>
			                          </div>
			                          </td>
			                          <td width="8%" align="center" style="vertical-align:middle">订货单位</td>
						              <td width="17%">
						              <div class="col-md-11">
						              <input class="form-control" type="text" id="orderUnit" name="orderUnit" readonly="readonly"  th:value="${contract.orderUnit}"/>
			                          </div>
			                          <div class="col-md-1">
			                          <span style="color:#F00"></span>
			                          </div>
			                          </td>
						             </tr>
						             <tr class="even gradeC">
			                          <td width="8%" align="center" style="vertical-align:middle">项目名称</td>
						              <td colspan="5">
						              <div class="col-md-11">
						              <input class="form-control" type="text" id="projectName" name="projectName" readonly="readonly"  th:value="${contract.projectName}"/>
						              </div>
			                          <div class="col-md-1">
			                          <span style="color:#F00"></span>
			                          </div>
			                          </td>
						             </tr>
						             <tr>
						              <td width="8%" align="center" style="vertical-align:middle">订货地址</td>
						              <td colspan="5">
						              <div class="col-md-11">
						              <input class="form-control" type="text" id="orderAddress" name="orderAddress" readonly="readonly"  th:value="${contract.orderAddress}"/>
						              </div>
			                          <div class="col-md-1">
			                          <span style="color:#F00"></span>
			                          </div></td>
						             </tr>
						            </tbody>
						        </table>
                              </form>
                            </div>
                            <div class="form-inline">
                            	 <div class="form-group">
								 <div class="box-header with-border">
				                    <i class="fa fa-th-list"></i>
				                    <h4 class="box-title">设备明细</h4>
				                 </div>
				                 </div>
								 <div class="btn-group pull-right">
									 <button type="button" class="btn btn-info editDeviceBtn">编辑出厂信息</button>
							     </div>
							 </div>
                             	<table id="resultDeviceTable" class="mytable dataTable table-bordered text-center table-striped table-hover" cellspacing="0" width="100%">
			                    <thead>
			                        <tr>
			                            <th width="10%">序号</th>
			                            <th width="10%"><input type="checkbox" id="checkAllDevice"/></th>
			                            <th width="15%">产品型号</th>
			                            <th width="10%">产品类型</th>
			                            <th width="15%">产品名称</th>
			                            <th width="10%">细分类型</th>
			                            <th width="15%">设备编号</th>
			                            <th width="15%">出厂时间</th> 
			                        </tr>
			                    </thead>
			                    <tbody>
			                    </tbody>
	                		</table>
                             
                        </div>
                         <div class="box-body">
							<a type="button" class="btn btn-default resetBtn pull-right" href="javascript:history.go(-1)">返回</a>
							<button class="btn btn-info pull-right saveContractBtn">保存</button>
						</div>  
                    </div>
                </div>
            </section>
            
        <!--设备出厂信息编辑弹窗-->
    	<div class="modal" id="editDeviceModal">
        <div class="modal-dialog" role="dialog">
        <div class="modal-content">
		<form id="editDeviceAtrrForm">
		<input class="form-control" type="hidden" id="deviceID" name="deviceID"/>
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-label="Close">
			<span aria-hidden="true">&times;</span>
			</button>
		    <h4 class="modal-title">
				<strong>设置出厂信息</strong>
			</h4>
		</div>
		<div class="modal-body">
		<table class="table table-bordered">
			<tbody>
			<tr class="odd gradeX">
			<td width="15%" align="center" style="vertical-align:middle">设备编号</td>
			<td width="35%">
			<div class="col-md-11">
			<input class="form-control" type="text" id="leaveFactoryCode" name="leaveFactoryCode" datatype="*,*1-100,t" nullmsg="请输入设备编号" />
			</div>
			<div class="col-md-1">
			<span style="color:#F00">*</span>
			</div></td>
			<td width="15%" align="center" style="vertical-align:middle">出厂日期</td>
			<td width="35%">
			<div class="col-md-11">
			<input class="form-control" type="date" id="leaveFactoryDate" name="leaveFactoryDate" datatype="*,*1-100,t" nullmsg="请输入出厂日期" />
			</div>
			<div class="col-md-1">
			<span style="color:#F00">*</span>
			</div></td>
			</tr>
			</tbody>
		</table>
        </div>
		<div class="modal-footer">
		    <button type="button" class="btn btn-primary saveDeviceBtn">确定</button>
		    <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
		</div>
		</form>
		</div>
		</div>
        </div>
        
        <!--引入合同信息弹窗-->
		 <div class="modal" id="queryContractModal">
			 <div class="modal-dialog" role="dialog" style="width:60%">
				 <div class="modal-content">
					 <form id="queryContractForm">
							 <div class="modal-header">
								 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
								 <h4 class="modal-title"><strong>合同信息引入</strong></h4>
							 </div>
								 <div class="form-horizontal">
									 <div class="box-body">
										 <div class="form-inline">
											 <div class="input-group">
												 <input type="text" class="form-control" id="keywordContract"  placeholder="Search..." />
										<span class="input-group-btn">
											<button type="button" id="search-btn" class="btn btn-info searchContractBtn">查询</button>
                                            <button type="button" id="reset-btn" class="btn btn-info resetContractBtn">撤消</button>
										</span>
											 </div>
										 </div>
									 </div>
									 <div class="box box-body" >
										 <table id="resultContractTable" class="mytable dataTable table-bordered text-center table-striped table-hover" cellspacing="0" width="100%" align="center">
											 <thead>
											 <tr>
												 <th width="6%">序号</th>
												 <th width="20%">合同号</th>
												 <th width="10%">签订日期</th>
												 <th width="10%">订货单位</th>
												 <th width="24%">项目名称</th>
												 <th width="24%">订货地址</th>
												 <th width="6%">选择</th>
											 </tr>
											 </thead>
											 <tbody>

											 </tbody>
										 </table>
										 <div class="modal-footer">
											 <!-- <button type="button" class="btn btn-info" id="pull-in">引入</button> -->
											 <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
										 </div>
									 </div>
								 </div>
					 </form>
				 </div>
			 </div>
		 </div>
    		
            <script th:src="@{/afterSaleDeviceInfo/deviceInfoindex.js}"></script>
            <script th:src="@{/afterSaleDeviceInfo/deviceInfoDevice.js}"></script>
        </div>
		
</body>
</html>